package com.jjh.mapper;

import com.jjh.pojo.Category;
import org.apache.ibatis.annotations.Mapper;

import java.sql.SQLIntegrityConstraintViolationException;
import java.util.List;
import java.util.Map;

@Mapper
public interface CategoryMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Category record);

    Category selectByPrimaryKey(Integer id);

    List<Category> selectAll();

    int updateByPrimaryKey(Category record);

    List<Category> getByCondition(Map<String, Object> map);

    Category getByName(String name);

    void deleteByIds(List<Integer> ids) throws SQLIntegrityConstraintViolationException;

    List<Category> getCatesByTypeId(Integer typeId);
}